import './assets/main.css'
import 'element-plus/dist/index.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'

import App from './App.vue'
import router from './router'
import './views/custom-element'

window.log = (...args) => {
  const log = (...args) =>
    console.log.bind(
      console,
      '%c[Vue3Test]',
      'background-color: #4CAF50; font-weight: 800;'
    )(...args)

  const ob1 = { ...args }

  console.log('XXob1', ob1)
  Object.keys(ob1).forEach((key) => {
    log(`${key}:`, ob1[key])
  })
}

window.info = console.info.bind(
  console,
  '%c[info]',
  'background-color: #b14851ff; font-weight: bold;'
)

const app = createApp(App)

app.use(ElementPlus)
app.use(createPinia())
app.use(router)

app.mount('#app')
